<!-- /* Description for file.
 * 简历批注初始化页面
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/resumespostils
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0716
 * @lastmodified  张海杰2011年0716
 */
 -->

<?php
echo $html->css ( 'style' );
echo $html->css ( 'tab' );
echo $javascript->link ( 'jquery' );
?>

<script>
$(function() { 
	$("#checkedAll").click(function() { 
	if ($(this).attr("checked") == true) { // 全选 
	$("input[name='checkbox_name']").each(function() { 
	$(this).attr("checked", true); 
	}); 
	} else { // 取消全选 
	$("input[name='checkbox_name']").each(function() { 
	$(this).attr("checked", false); 
	}); 
	} 
	}); 
	}); 

function getDelStr() {
	var delArr = $("#ResumespostilDeleteSomeForm :checkbox:checked");
	if(delArr.length==0)
	{
		alert("请选择你要删除的项!");
		return;
	}
	var str = "";
	for(var i=0;i<delArr.length;i++) {
		var del = delArr[i].value;
		str += del;
		str += "/";
	}
	$("#delStr").val(str);
	$("#ResumespostilDeleteSomeForm").submit();
}
//行业二层字段 级联菜单 //
$(function() {
	$("#ResumespostilDropsuitIndustry1").change(function(){
		var list = $(this).val();
		if(list!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/industries/industriesQuery/",{
				Industry : $(this).val()
				},
			function(data,textStatus){
					 $("#ResumespostilDropsuitIndustry2:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#ResumespostilDropsuitIndustry2:eq(0)").append("<option></option>");
					 $("#ResumespostilDropsuitIndustry2:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
	});
//职位二层字段 级联菜单 //
	$("#ResumespostilDropsuitPosition1").change(function(){
		var PositionDroptoplist = $(this).val();
		if(PositionDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/positions/getPosition/",{
				Position : $(this).val()
				},
			function(data,textStatus){
					 $("#ResumespostilDropsuitPosition2:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#ResumespostilDropsuitPosition2:eq(0)").append("<option></option>");
					 $("#ResumespostilDropsuitPosition2:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
	});
	//提交时构造 //
	$("#ResumespostilAddForm").bind("submit", function() { 
		var value = "";
		if($("#ResumespostilDropsuitIndustry1 option:selected").text()!="不限")
		value = $("#ResumespostilDropsuitIndustry1 option:selected").text()+'_';
		if($("#ResumespostilDropsuitIndustry2 option:selected").text()!="不限"&&$("#ResumespostilDropsuitIndustry2 option:selected").text()!="--")
		value += $("#ResumespostilDropsuitIndustry2 option:selected").text();
		$("#ResumespostilSuitIndustry").val(value); 

		var value2 = "";
		if($("#ResumespostilDropsuitPosition1 option:selected").text()!="不限")
		value2 = $("#ResumespostilDropsuitPosition1 option:selected").text()+'_';
		if($("#ResumespostilDropsuitPosition2 option:selected").text()!="不限"&&$("#ResumespostilDropsuitPosition2 option:selected").text()!="--")
		value2 += $("#ResumespostilDropsuitPosition2 option:selected").text();
		$("#ResumespostilSuitPosition").val(value2); 

		});
	
});


</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Resumesmanagements');//一级目录
										   echo '>';echo __('Resumesallinfo search');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true));//简历详细信息当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">
<!-- 新增form开始 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
			<tr>
				<td height="20"><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumedetail/<?php echo $resume['Resume']['id'];?>">具体简历</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/mutualityresume/<?php echo $resume['Resume']['id'];?>">相关简历</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumespostils/init/<?php echo $resume['Resume']['id'];?>"  style="color:Red;">简历批注</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumecommend/<?php echo $resume['Resume']['id'];?>">推荐面试</a></td>
				<TD align="center"><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/allinfosuitposition/<?php echo $resume['Resume']['id'];?>">适合职位</a></TD>
				<td align="center"><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumefiles/<?php echo $resume['Resume']['id'];?>">简历附件</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumereports/<?php echo $resume['Resume']['id'];?>">简历报告</a></td>
				<TD align="center"><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/viewresumecontext/<?php echo $resume['Resume']['id'];?>">查看全文</a></TD>
				<td></td>
			</tr>
	</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">	
<?php echo $form->create('Resumespostil',array('action'=>'add','type'=> 'post'));?>
<fieldset><legend><?php __('Resumespostils');?></legend>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
			<td colspan="5">简历原件：
		<?php 	if($resume['Resume']['resumefilepath']!=null&&$resume['Resume']['resumefilepath']!="")
				{
					$dir="files-resumefiles";
					echo $html->link($resume['Resume']['resumefilename'],
					'/resumes/down/'.$dir.'/'.$resume['Resume']['resumefilepath'],
					array('class'=>'view'));
				}
		?>
		</td> 
		</tr>


	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil resumeid');//简历ID?></td>
		<td colspan="4"><?php echo $resume['Resume']['id']; //id?>
		<?php echo $form->hidden('resume_id',array('default'=>$resume['Resume']['id']));//简历id?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil salaryarea');//适合年薪?>：</td>
		<td>
		<!-- 适合年薪下拉-->
				<?php
					$options = array();
					foreach($theSalaryarea as $eachrecord)
					{
						$options[$eachrecord['Salaryarea']['id']] = $eachrecord['Salaryarea']['name'];
					}
					echo $form->input('suitYearlySalary',array('options'=>$options,'label'=>false,'div'=>false));		
				?>
		</td>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil intentWorkAddress');//意向工作地点?>:</td>
		<td>
		<?php echo $form->input('intentWorkAddress',array('class' => 'TextBoxE1','label'=>false));?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil suitFirmSize');//适合企业性质?>:</td>
		<td>
			<!-- 适合企业性质下拉-->
			<?php
				$op2 = array();
				foreach($theFirmattribute as $eachrecord)
				{
					$op2[$eachrecord['Firmattribute']['id']] = $eachrecord['Firmattribute']['name'];
				}
				echo $form->input('suitFirmSize',array('options'=>$op2,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>
		</td>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil suitCompanyProperty');//适合企业阶段?>:</td>
		<td>
			<!-- 适合企业阶段下拉-->
			<?php
				$op3 = array();
				foreach($theCompetencyphase as $eachrecord)
				{
					$op3[$eachrecord['Competencyphase']['id']] = $eachrecord['Competencyphase']['name'];
				}
				echo $form->input('suitCompanyProperty',array('options'=>$op3,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil suitIndustry');//适合行业?>:</td>
		<td colspan="4">
			<!-- 适合行业下拉一-->
			<?php
				$op4 = array();
				foreach($industrys as $eachrecord)
				{
					$op4[$eachrecord['Industry']['id']] = $eachrecord['Industry']['name'];
				}
				echo $form->input('dropsuitIndustry1',array('options'=>$op4,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>

			<!-- 适合行业下拉二-->
			<?php
				echo $form->input('dropsuitIndustry2',array('options'=>array('0'=>'不限'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>
			<?php
				echo $form->hidden('suitIndustry');		
			?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Resumespostil suitPosition');//适合职位?>:</td>
		<td colspan="4">
			<!-- 适合职位下拉一-->
			<?php
				$op5 = array();
				foreach($positions as $eachrecord)
				{
					$op5[$eachrecord['Position']['id']] = $eachrecord['Position']['name'];
				}
				echo $form->input('dropsuitPosition1',array('options'=>$op5,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>

			<!-- 适合职位下拉二-->
			<?php
				echo $form->input('dropsuitPosition2',array('options'=>array('0'=>'不限'),'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
			?>
			<?php
				echo $form->hidden('suitPosition');		
			?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Content');//内容?>:</td>
		<td colspan="4"><?php echo $form->textarea('context',array('class' => 'areaStyle','label'=>false));?></td>
	</tr>

	<tr>
		<td width="50"></td>
		<td width="100"></td>
		<td colspan="4">
		<table width="40%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td width="100px">
				<?php echo $form->button('批注入库',array('type'=>'submit','class'=>'btn4'));?> 			
				<!-- __('Add', true)增加--></td>
				<td width="100px"
				><?php echo $form->button('重置',array('type'=>'reset','class'=>'btn2'));?>
				<!-- __('reset', true)取消--></td>
				<td width="100px">
				<a style="cursor:pointer;" href="javascript:getDelStr();"><?php echo $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0'));?>&nbsp;删除</a>
				</td>
				<!--  __('delete', true) 删除、提示 -->
				<td></td>
			</tr>
		</table>
		</td>
	</tr>

</table>
</fieldset>
<?php echo $form->end();?>
</table>
<!-- 新增form结束 -->
<!--删除form开始 -->
<?php echo $form->create('Resumespostil',array('action'=>'deleteSome','type'=> 'post'));?>
<?php echo $form->hidden('delStr',array('name'=>'ids','id'=>'delStr'));?>
<div id="nav1" style="width: 97%">
<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="70px"><?php echo $form->checkbox('',array('id'=>'checkedAll'));?></th>
		<th width="140px"><?php echo __('Resumespostil allowperson');?></th>
		<th width="140px"><?php echo __('Resumespostil created');?></th>
		<th><?php echo __('Content') ?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	<?php 
	foreach ($postilList as $datas): 
	
	?>
		<tr class=normal onmouseover='this.className= "over " '
		onmouseup='this.className= "over " '
		onmouseout='this.className= "normal " '>
		<td><!-- 批量删除选择 -->				
			<?php echo $form->checkbox($datas['Resumespostil']['id'], array('value' => $datas['Resumespostil']['id'],'name'=>'checkbox_name'));?>
			</td>
		<td><?php echo $datas['Resumespostil']['creater']; ?></td>
		<td><?php echo $datas['Resumespostil']['created']; ?></td>
		<td><?php echo $datas['Resumespostil']['context']; ?></td>

	</tr> 
	<?php endforeach; ?>  
	</table>
</div>
<?php echo $form->end();?>
<!--删除form结束 -->
</div>


